home *** CD-ROM | disk | FTP | other *** search
- name tnc2vec
- include pmacros.h
-
- extproc int14
-
- ; tnc2vec - TNC2 emulator INT14 handler
- pubproc tnc2vec
-
- sti
- ; save regs, making them available to int14()
- push es
- push ds
- push ax
- push bx
- push cx
- push dx
- push di
-
- getds
- mov ds,ax
- ifndef LARGEDATA
- mov es,ax
- endif
-
- call int14@
-
- test ax,ax ; test if we handled the INT14
- pop di
- pop dx
- pop cx
- pop bx
- pop ax
- pop ds
- pop es
- jnz do_iret ; yes, we can IRET back to caller
- ; if no, far-jump to the original handler
- db 0eah ; opcode for a far jump
- pubvar tnc2ovec,<dw 0,0ffffh> ; original INT14 handler address
- ; is stored here by initialization code
- do_iret:
- iret
- pend tnc2vec
-
- end
-